package city.spring.modules.medicalstation.medical.service;

import city.spring.modules.medicalstation.medical.entity.MedicalRecordEntity;
import city.spring.modules.medicalstation.medical.vo.MedicalRecordEntityVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Service：
 *
 * @author
 * @date 2020-06-17 14:23:13
 */
public interface MedicalRecordService extends IService<MedicalRecordEntity> {
    String CACHE_NAME = "medical_record";

    /**
     * 业务处理：保存一个 <strong></strong>
     *
     * @param entity
     */
    void saveHealthSeeDoctor(MedicalRecordEntity entity);

    /**
     * 业务处理：修改一个 <strong></strong>
     *
     * @param entity
     */
    void updateHealthSeeDoctor(MedicalRecordEntity entity);

    /**
     * 业务处理：删除一个 <strong></strong>
     *
     * @param primaryKey 主键ID
     */
    void deleteHealthSeeDoctor(String primaryKey);

    /**
     * 业务处理：删除多个 <strong></strong>
     *
     * @param primaryKeys 主键ID列表
     */
    void deleteHealthSeeDoctor(List<String> primaryKeys);

    /**
     * 分页获取的就医记录
     *
     * @param page    分页对象
     * @param wrapper 查询对象
     * @return 就医记录
     */
    IPage<MedicalRecordEntityVO> listPage(Page<? extends MedicalRecordEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends MedicalRecordEntity> wrapper);
}